#include"threadpool.hpp"

int main()
{

  srand((unsigned int)time(nullptr));
  Threadpool<int>* tp=new Threadpool<int>;//线程池
  tp->ThreadpoolInit();//初始化线程池当中的线程
  while(1)
  {
    sleep(1);
    int data=rand()%100+1;
    printf("产生任务：%d\n",data);
    tp->Push(data);
  }
  return 0;
}
